import pymysql


class CONFIG:
    __name = "root"
    __user = "root"
    __pass = "123456"
    __host = "localhost"

    @staticmethod
    def getSql(): #返回数据库连接对象
        return pymysql.connect(CONFIG.__host, CONFIG.__user, CONFIG.__pass, CONFIG.__name)

    @staticmethod
    def getName():
        return CONFIG.__name

    @staticmethod
    def getUser():
        return CONFIG.__user

    @staticmethod
    def getPass():
        return CONFIG.__pass
